home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / bin / compiz < prev    next >
Encoding:
Text File  |  2007-04-04  |  1.5 KB  |  49 lines

  1. #!/bin/sh
  2.  
  3. GLXINFO='/usr/bin/glxinfo'
  4. EXT_TFP='GLX_EXT_texture_from_pixmap'
  5.  
  6. COMPIZ_OPTIONS="--no-fbo --ignore-desktop-hints"
  7.  
  8. # Check whether the GLX_EXT_texture_from_pixmap extension is available in
  9. # direct or indirect rendering contexts. If it is available only in indirect
  10. # rendering contexts, force compiz to use indirect rendering.
  11. #if test `$GLXINFO 2> /dev/null | grep -c $EXT_TFP` -lt 3; then
  12. #    echo "$EXT_TFP is not available with direct rendering."
  13. #
  14. #    export LIBGL_ALWAYS_INDIRECT=1
  15. #    if test `$GLXINFO 2> /dev/null | grep -c $EXT_TFP` -lt 3; then
  16. #        echo "$EXT_TFP is not available with indirect rendering. Aborting!"
  17. #        unset LIBGL_ALWAYS_INDIRECT
  18. #        exit 1
  19. #    else
  20. #        echo "$EXT_TFP is available with indirect rendering."
  21. #    fi
  22. #else
  23. #    echo "$EXT_TFP is available with direct rendering."
  24. #fi
  25.  
  26. # start the gtk-window-decorator if present
  27. #if [ -x /usr/bin/gtk-window-decorator ]; then
  28. #    /usr/bin/gtk-window-decorator --replace &
  29. #fi
  30.  
  31. # load the gconf plugin if present
  32. if [ -f /usr/lib/compiz/libgconf.so ]; then
  33.     COMPIZ_PLUGINS="$COMPIZ_PLUGINS gconf"
  34. fi
  35.  
  36. if [ "`pidof Xgl`" ]; then
  37.     if [ -f /usr/lib/nvidia/libGL.so.1.2.xlibmesa ]; then
  38.     LD_PRELOAD=/usr/lib/nvidia/libGL.so.1.2.xlibmesa compiz.real $COMPIZ_OPTIONS "$@" $COMPIZ_PLUGINS
  39.     fi
  40.  
  41.     if [ -f /usr/lib/fglrx/libGL.so.1.2.xlibmesa ]; then
  42.     LD_PRELOAD=/usr/lib/fglrx/libGL.so.1.2.xlibmesa compiz.real $COMPIZ_OPTIONS "$@" $COMPIZ_PLUGINS
  43.     fi
  44. fi
  45.  
  46. # always load the gconf plugin
  47. /usr/bin/compiz.real $COMPIZ_OPTIONS "$@" $COMPIZ_PLUGINS || metacity
  48.  
  49.